import customApi from "@/api/declaration/crm/customApi"
import httpRequest from "@/config/axios/httpRequest"
import { CrmCustomerLimitConfigModel } from "@/models/crm/CrmCustomerLimitConfigModel"

// 查询客户限制配置列表
export const getCustomerLimitConfigPage = async (params) => {
  return await httpRequest.get(customApi.GetCustomerLimitConfigPage, { params })
}

// 查询客户限制配置详情
export const getCustomerLimitConfig = async (id: number) => {
  return await httpRequest.get(customApi.GetCustomerLimitConfig, { params: { id } })
}

// 新增客户限制配置
export const createCustomerLimitConfig = async (data: CrmCustomerLimitConfigModel) => {
  return await httpRequest.post(customApi.CreateCustomerLimitConfig, data)
}

// 修改客户限制配置
export const updateCustomerLimitConfig = async (data: CrmCustomerLimitConfigModel) => {
  return await httpRequest.put(customApi.UpdateCustomerLimitConfig, data)
}

// 删除客户限制配置
export const deleteCustomerLimitConfig = async (id: number) => {
  return await httpRequest.delete(customApi.DeleteCustomerLimitConfig, { params: { id } })
}
